package sunwin.yoms.comm.model;

import jodd.datetime.JDateTime;

import java.util.Date;

/**
 * Created by mt on 2015-9-18.
 */
public class DateTimeSpan {
    private Date startDateTime = new JDateTime().convertToDate();
    private Date endDateTime = new JDateTime().convertToDate();

    public Date getStartDateTime() {
        return startDateTime;
    }

    public void setStartDateTime(Date startDateTime) {
        this.startDateTime = startDateTime;
    }

    public Date getEndDateTime() {
        return endDateTime;
    }

    public void setEndDateTime(Date endDateTime) {
        this.endDateTime = endDateTime;
    }

    /*String DateTime*/
    public String getStartDateTimeString() {
        return new JDateTime(startDateTime).toString("YYYY-MM-DD hh:mm:ss");
    }

    public void setStartDateTimeString(String startDateTime) {
        this.startDateTime = new JDateTime(startDateTime).convertToDate();
    }

    public String getEndDateTimeString() {
        return new JDateTime(endDateTime).toString("YYYY-MM-DD hh:mm:ss");
    }

    public void setEndDateTimeString(String endDateTime) {
        this.endDateTime = new JDateTime(endDateTime).convertToDate();
    }
}
